/* Reset & base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    font-family: 'SF MONO', 'Fira Code', monospace;
    transition: background-color 0.5s ease;
}

/* Theme modes */
body.dark-mode {
    background-color: #0a0a0a;
    color: #ffffff;
}

body.light-mode {
    background-color: #f5f5f5;
    color: #0a0a0a;
}

/* Typography */
.header {
    letter-spacing: 0.2em;
    font-size: 0.95rem;
    text-transform: uppercase;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.tagline {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 300;
    font-family: Georgia, serif;
    width: 600px;
    max-width: 90vw;
}

/* Layout sections */
#landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

section:not(#landing) {
    min-height: 100vh;
    padding: 6rem 2rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* Landing page navigation - vertical list */
.landing-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 3rem;
    align-items: center;
}

.landing-link {
    color: inherit;
    text-decoration: none;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s;
    position: relative;
}

.landing-link::before {
    /* Arrow that appears on hover */
    content: '→ ';
    opacity: 0;
    position: absolute;
    left: -1.5rem;
    transition: opacity 0.2s;
}

.landing-link:hover {
    opacity: 1;
}

.landing-link:hover::before {
    opacity: 1;
}

/* Back to home link on other pages */
.back-home {
    position: fixed;
    top: 2rem;
    left: 2rem;
    color: inherit;
    text-decoration: none;
    opacity: 0.6;
    transition: opacity 0.2s;
    z-index: 100;
}

.back-home:hover {
    opacity: 1;
}

/* PCB effect */
.pcb-container {
    position: relative;
    width: 900px;
    max-width: 90vw;
    aspect-ratio: 32/9;
}

.pcb-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

body.dark-mode .pcb-base {
    background-image: url('../assets/xray.png');
}

body.dark-mode .pcb-reveal {
    background-image: url('../assets/realistic.png');
    clip-path: circle(0px at 50% 50%);
}

body.light-mode .pcb-base {
    background-image: url('../assets/realistic.png');
}

body.light-mode .pcb-reveal {
    background-image: url('../assets/xray.png');
    background-color: #0a0a0a;
    clip-path: circle(0px at 50% 50%);
}

.custom-cursor {
    position: fixed;
    width: 90px;
    height: 90px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 1000;
}

body.light-mode .custom-cursor {
    border-color: rgba(0, 0, 0, 0.3);
}

/* Modde toggle button */
.mode-toggle {
    margin-top: 2rem;
}

.mode-toggle .mode-button {
    display: flex;
    padding: 0;
    background: transparent;
    border: 2px solid;
    color: inherit;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mode-toggle .mode-icon {
    padding: 0.25rem 0.75rem;
    transition: all 0.3s ease;
}

.mode-toggle .dark-icon,
.mode-toggle .light-icon {
    display: none;
}

body.dark-mode .mode-toggle .dark-icon {
    display: block;
    background: white;
    color: black;
    margin-left: 2.25rem;
}

body.light-mode .mode-toggle .light-icon {
    display: block;
    background: black;
    color: white;
    margin-right: 2.25rem;
}

body.dark-mode .mode-toggle .mode-button {
    border-color: rgba(255, 255, 255, 0.5);
}

body.light-mode .mode-toggle .mode-button {
    border-color: rgba(0, 0, 0, 0.5);
}

/* Mode toggle on different pages */
#landing .mode-toggle {
    margin-top: 1.5rem;
}

/* Social Icons on Landing */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

.social-icon {
    opacity: 0.6;
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
}

.social-icon:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.social-icon img {
    width: 1.2rem;
    height: 1.2rem;
}

body.dark-mode .social-icon img {
    filter: invert(1) brightness(1);
}

body.light-mode .social-icon img {
    filter: none;
}


.page-mode-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    margin: 0rem;
    z-index: 100;
}

/* About Page Styles */
.about-container {
    max-width: 800px;
    width: 100%;
    padding: 0 2rem;
}

/* Profile Section */
.profile-section {
    text-align: center;
    margin-bottom: 4rem;
    animation: fadeIn 0.6s ease-out;
}

.profile-picture {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

body.dark-mode .profile-picture {
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(255, 255, 255, 0.1);
}

body.light-mode .profile-picture {
    border: 3px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.profile-picture:hover {
    transform: scale(1.05);
}

body.dark-mode .profile-picture:hover {
    box-shadow: 0 12px 48px rgba(255, 255, 255, 0.15);
}

body.light-mode .profile-picture:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
}

.profile-name {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.profile-title {
    font-size: 1.1rem;
    opacity: 0.7;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.9rem;
}

/* Bio Section */
.bio-section {
    margin-bottom: 4rem;
    animation: fadeIn 0.8s ease-out;
}

.section-heading {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 1rem;
    opacity: 0.8;
}

.bio-content p {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

.bio-content strong {
    font-weight: 600;
    opacity: 1;
}

.highlight-yellow {
    color: #ffd700;
}

body.light-mode .highlight-yellow {
    color: #ffa200;
}

.highlight-red {
    color: #ff453a;
}

body.light-mode .highlight-red {
    color: #f10c00;
}

.highlight-blue {
    color: #00a4fc;
}

body.light-mode .highlight-blue {
    color: #003db8;
}

/* Quote Section */
.quote-section {
    margin: 4rem 0;
    text-align: center;
}

.favorite-quote {
    font-size: 1.3rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.6;
    opacity: 0.8;
    margin: 0;
    padding: 0;
    border: none;
}

/* Gallery Section */
.gallery-section {
    margin-bottom: 4rem;
    animation: fadeIn 1s ease-out;
}

.gallery-grid {
    column-count: 3;
    column-gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    display: inline-block;
    width: 100%;
}

body.dark-mode .gallery-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .gallery-item {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.gallery-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.gallery-item:hover {
    transform: translateY(-4px);
}

body.dark-mode .gallery-item:hover {
    box-shadow: 0 12px 32px rgba(255, 255, 255, 0.15);
}

body.light-mode .gallery-item:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

/* Skills Section on About Page */
.skills-section {
    margin-top: 4rem;
}

.skills-content-about {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.skills-content-about .skill-category {
    margin-bottom: 0;
}

.skills-content-about .skill-category-name {
    font-size: 0.85rem;
    font-weight: 400;
    margin-bottom: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.6;
}

.skills-content-about .skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skills-content-about .skill-box {
    padding: 0.4rem 0.85rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-weight: 400;
    transition: all 0.2s ease;
    cursor: default;
}

body.dark-mode .skills-content-about .skill-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

body.light-mode .skills-content-about .skill-box {
    background: rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.skills-content-about .skill-box:hover {
    transform: translateY(-1px);
}

body.dark-mode .skills-content-about .skill-box:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

body.light-mode .skills-content-about .skill-box:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Projects Page Styles */
.projects-container {
    max-width: 1200px;
    width: 100%;
    padding: 0 2rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

body.dark-mode .project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .project-card {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.project-card:hover {
    transform: translateY(-8px);
}

body.dark-mode .project-card:hover {
    box-shadow: 0 16px 40px rgba(255, 255, 255, 0.15);
}

body.light-mode .project-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.project-image-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.project-image-blur {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1.3);
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(40px) saturate(1.2);
    z-index: 0;
}

body.dark-mode .project-image-blur {
    opacity: 0.4;
}

body.light-mode .project-image-blur {
    opacity: 0.6;
}

.project-image {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 200px;
    object-fit: contain;
}

.project-content {
    padding: 1.5rem;
}

.project-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.project-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin: 0;
}

.project-subtitle {
    font-size: 0.85rem;
    font-weight: 400;
    margin-top: 0.35rem;
    margin-bottom: 0.75rem;
    opacity: 0.7;
}

body.dark-mode .project-subtitle.highlight {
    color: #ffd700;
    opacity: 0.9;
}

body.light-mode .project-subtitle.highlight {
    color: #ffa200;
    opacity: 0.9;
}

.project-icons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.project-icon-link {
    opacity: 0.7;
    transition: opacity 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
}

.project-icon-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

body.dark-mode .project-icon-link svg {
    stroke: #ffffff;
}

body.light-mode .project-icon-link svg {
    stroke: #000000;
}

.project-description {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
    margin-bottom: 1rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.tech-tag {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
    border-radius: 3px;
}

body.dark-mode .tech-tag {
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .tech-tag {
    background: rgba(0, 0, 0, 0.08);
}


/* Responsive */
@media (max-width: 1024px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

/* Contact Page Styles */
.contact-container {
    max-width: 600px;
    width: 100%;
    padding: 0 2rem;
    text-align: center;
}

.contact-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}

.contact-subtitle {
    font-size: 1rem;
    opacity: 0.7;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

body.dark-mode .contact-link {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.light-mode .contact-link {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-link:hover {
    transform: translateY(-4px);
}

body.dark-mode .contact-link:hover {
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.1);
}

body.light-mode .contact-link:hover {
    background: rgba(0, 0, 0, 0.04);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.contact-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.75rem;
}

body.dark-mode .contact-icon {
    filter: invert(1) brightness(1);
}

body.light-mode .contact-icon {
    filter: none;
}

.contact-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

.contact-value {
    font-size: 1.1rem;
    font-weight: 400;
}

/* Experience Page Styles */
.experience-container {
    max-width: 800px;
    width: 100%;
    padding: 0 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 3rem;
    letter-spacing: 0.05em;
    text-align: center;
}

.experience-section {
    margin-bottom: 3rem;
}

.section-heading {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.8;
}

.experience-grid {
    display: grid;
    gap: 2rem;
}

.experience-card {
    transition: opacity 0.3s ease;
}

.experience-card:hover {
    opacity: 0.7;
}

.experience-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.75rem;
    gap: 2rem;
}

.experience-title-group {
    flex: 1;
    min-width: 0;
}

.experience-role {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 0.25rem;
}

.experience-company {
    font-size: 0.95rem;
    opacity: 0.6;
}

.experience-date {
    font-size: 0.85rem;
    opacity: 0.5;
    font-family: 'SF Mono', 'Fira Code', monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.experience-description ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.experience-description li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
    opacity: 0.8;
}

.experience-description li::before {
    content: '–';
    position: absolute;
    left: 0;
    opacity: 0.5;
}

/* Fade-in animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skills Page Styles */
.skills-container {
    max-width: 750px;
    width: 100%;
    padding: 0 2rem;
}

.skills-content {
    margin-top: 3.5rem;
}

.skill-category {
    margin-bottom: 3.5rem;
}

.skill-category:last-child {
    margin-bottom: 0;
}

.skill-category-name {
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 1.25rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    opacity: 0.7;
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: flex-start;
}

.skill-box {
    padding: 0.45rem 0.9rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s ease;
    cursor: default;
}

body.dark-mode .skill-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

body.light-mode .skill-box {
    background: rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.skill-box:hover {
    transform: translateY(-1px);
}

body.dark-mode .skill-box:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

body.light-mode .skill-box:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .tagline {
        font-size: 1.75rem;
    }

    .pcb-container {
        width: 100%;
    }

    .profile-picture {
        width: 140px;
        height: 140px;
    }

    .profile-name {
        font-size: 1.6rem;
    }

    .bio-content p {
        font-size: 1rem;
    }

    .gallery-grid {
        column-count: 2;
        column-gap: 1rem;
    }
}