/* ==========================================================================
   1. Imports and Variables
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&display=swap');

:root {
  --bg-color: #111111;
  --text-color: #ffffff;
  --text-secondary: #808080b7;
  --spacing: 1.8rem;
}

/* ==========================================================================
   2. Reset and Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Scrollbar Hiding */
::-webkit-scrollbar {
  display: none;
}

body {
  -ms-overflow-style: none;
  scrollbar-width: none;
  background-color: var(--bg-color);
  color: var(--text-color);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
  font-size: 14px;
  animation: fadeIn 0.6s ease;
}

 .no-style {
    text-decoration: none; /* Removes the underline */
    color: inherit; /* Makes the link inherit the text color from the parent */
  }

/* ==========================================================================
   3. Typography
   ========================================================================== */
h1 {
  font-size: 1.1rem;
  margin: 0;
  font-weight: 600;
  margin-bottom: 0.1rem;
}

h2 {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--spacing);
  letter-spacing: 0.1em;
  font-weight: normal;
}

h3 {
    font-size: 0.9rem;
    margin: 0;
    font-weight: 600;
    margin-bottom: 0.1rem;
  }

/* ==========================================================================
   4. Layout & Container Components
   ========================================================================== */
.container {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin: 80px auto;
    display: flex;
    flex-direction: column;
    align-content: center;
    position: relative;
    z-index: 1;
    padding: 0 24px;
}

.page-content {
    opacity: 1;
    transition: opacity 0.3s ease;
}

main {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   5. Navigation
   ========================================================================== */
.navbar {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 8px;
}

.navbar a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.4s ease;
    position: relative;
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--text-secondary);
    transition: opacity 0.4s ease;
    opacity: 0;
}

.navbar a:hover::after {
    opacity: 1;
}

.navbar a.active {
    color: var(--text-color);
    text-decoration: underline;
    text-underline-offset: 8px;
}

.navbar a.active::after {
    display: none;
}

/* New styles for Get in Touch link */
.navbar a[href^="mailto"] {
    font-weight: 400;
}

.navbar a[href^="mailto"]:hover {
    color: var(--text-color);
}

.navbar a[href^="mailto"]::after {
    display: none;
}

/* ==========================================================================
   6. Header & Profile
   ========================================================================== */
header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--spacing);
}

.profile-img {
  width: 48px;
  height: 48px;
  border-radius: 10%;
  border: 2px solid #2d2d2f;
  margin-bottom: 0.75rem;
  position: relative;
  overflow: hidden;
}

/* Profile Image Animation */
.profile-img::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.1) 50%,
    transparent 100%
  );
  transform: rotate(45deg);
  animation: shimmer 2s infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.profile-img:hover::after {
  opacity: 1;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%) rotate(45deg);
  }
  100% {
    transform: translateX(100%) rotate(45deg);
  }
}

/* ==========================================================================
   7. Bio Section
   ========================================================================== */
.bio {
  width: 100%;
  margin: var(--spacing) 0;
  margin-top: 40px;
  margin-bottom: 80px;
  color: #808080;
  white-space: normal;
}

.bio strong {
  font-weight: 400;
  color: #ffffff;
  position: relative;
  cursor: pointer;
}

.bio strong::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 1px;
  bottom: -2px;
  left: 0;
  background-color: #ffffff;
  transform: scaleX(0);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.bio strong:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* ==========================================================================
   8. Projects Section
   ========================================================================== */
.project-list, .experience-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.project {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  position: relative;
}

.project-info {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  width: 100%;
}

.project-info h3 {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.project-info h3::after {
  content: "↗";
  display: inline-block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-left: 0.7rem;
  font-weight: 300;
  transition: transform 0.2s ease;
}

.project-info h3:hover::after {
  transform: translate(2px, -2px);
}

.year {
  position: absolute;
  right: calc(100% + 2rem);
  color: var(--text-secondary);
  font-size: 0.9em;
  width: 2.5rem;
  text-align: right;
  margin-top: 0.15em;
}

.role {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.9em;
  margin-left: auto;
}

/* ==========================================================================
   9. Experience Section
   ========================================================================== */
.experience {
  margin-top: calc(var(--spacing) * 2);
}

.experience-item {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.experience-info {
  margin-bottom: -1.5em;
}

.experience-info h3 {
  font-weight: normal;
}

.position-period {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 1em;
  margin-bottom: 1em;
}

.position, .period {
  margin: 0;
  font-size: 0.8rem;
}

.position {
  color: var(--text-color);
}

.period {
  color: var(--text-secondary);
}

/* ==========================================================================
   10. Design Section & Photo Gallery
   ========================================================================== */
.designs {
    margin-top: 40px;
}

.photo-gallery {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    width: 50%;
}

.photo {
    position: relative;
    width: 100%;
    height: auto;
    opacity: 1;
    transform: translateY(0);
}

.photo img {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.photo.visible img {
    opacity: 1;
    transform: translateY(0);
}

.photo img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    object-fit: cover;
    display: block;
}

.photo-skeleton {
    width: 100%;
    position: relative;
    background: #1a1a1a;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* If no padding-bottom is set via JS, use this as fallback */
.photo-skeleton:not([style*="padding-bottom"]) {
    height: 200px;
}

.photo-skeleton::after {
    content: '';
    width: 30px;
    height: 30px;
    border: 2px solid #252525;
    border-top: 2px solid #808080;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* ==========================================================================
   11. Modal Components
   ========================================================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 99999;
    pointer-events: none;
}

.modal:not([hidden]) {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
    z-index: 100000;
}

.modal-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
}

.modal-prev,
.modal-next {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    transition: opacity 0.3s ease;
}

.modal-prev:hover,
.modal-next:hover,
.modal-close:hover {
    opacity: 0.7;
}

/* ==========================================================================
   12. Collaboration Banner
   ========================================================================== */
.collaboration-banner {
    background-color: #1a1a1a;
    border-radius: 5px;
    padding: 1.2rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 4rem 0;
    position: relative;
    z-index: 1;
}

.collaboration-banner span {
    color: var(--text-color);
    font-size: 0.9rem;
}

.contact-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
    background-color: #252525;
    padding: 0.6rem 1rem;
    border-radius: 5px;
    white-space: nowrap;
}

.contact-button:hover {
    opacity: 0.7;
}

.email-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* ==========================================================================
   13. Animations
   ========================================================================== */
@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   14. Utility Classes
   ========================================================================== */
.bottom-line {
  width: 100%;
  height: 1px;
  background-color: #808080;
  opacity: 0.3;
  margin: 4rem 0 2rem 0;
}

.title {
  font-size: 0.8rem;
  color: var(--text-secondary);
  min-height: 1.2em;
}

.copyright-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
}

.copyright {
    margin: 0;
}

.linkedin-icon {
    width: 20px;
    height: 20px;
    fill: #818186;
    transition: fill 0.3s ease;
    margin-left: auto;
    position: relative;
    top: 1px;
}

.linkedin-icon:hover {
    fill: var(--text-color);
}

/* Text Animation */
.rotating-text {
  display: inline-block;
  opacity: 1;
  transition: opacity 0.5s ease-in-out;
}

.rotating-text.fade {
  opacity: 0;
}

/* ==========================================================================
   15. Media Queries
   ========================================================================== */
@media (max-width: 600px) {
    .container {
        margin: 40px auto;
        padding: 0 20px;
        width: 100%;
        box-sizing: border-box;
    }

    main {
        width: 100%;
        padding: 0;
    }

    /* Ensure images don't overflow */
    img {
        max-width: 100%;
        height: auto;
    }

    .project {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .year {
        position: static;
        text-align: left;
        margin: 0;
        padding: 0;
        order: -1;
    }

    .project-info {
        order: 0;
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        cursor: pointer;
    }

    .role {
        text-align: right;
        margin-left: auto;
    }

    .collaboration-banner {
        padding: 1rem;
        gap: 1rem;
    }

    .collaboration-banner span {
        font-size: 0.8rem;
    }

    .contact-button {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }

    /* Hide navigation arrows on mobile */
    .modal-nav {
        display: none; /* Hide arrows on mobile since we use swipe */
    }
    
    .modal-close {
        top: 10px;
        right: 10px;
    }
}

/* Utility Classes */
body.modal-open {
    overflow: hidden;
}
