/* Base styles */
:root {
    --text-color: #333;
    --background-color: #f0eacb; /* Off-white/beige color */
    --spacing: 2rem;
    --max-width: 680px;
    --link-color: #000; /* Black for links as requested */
    --link-hover-color: #333; /* Slightly lighter black for hover */
    --accent-color: #69a3c2; /* Light blue from the stamp */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: url('../images/cursor-airplane.png?v=2') 10 10, auto !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    position: relative;
    padding: 2rem;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}



/* Faded postcard background */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32vw;
    height: 25vh;
    background-image: url('../images/stamp-glued.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* Responsive postcard background for mobile */
@media (max-width: 768px) {
    body::before {
        width: 60vw;
        height: 35vh;
        opacity: 0.12;
    }
}

@media (max-width: 480px) {
    body::before {
        width: 70vw;
        height: 32vh;
        opacity: 0.10;
    }
}

/* Hide stamp on article pages */
.article-page::before {
    display: none; /* Remove the stamp completely on article pages */
}

/* Content container */
main {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    width: 100%;
    padding: 2rem;
}

/* Profile */
.profile-container {
    text-align: center;
    margin-bottom: 6rem;
    margin-top: -6rem;
    position: relative; /* Establish positioning context */
}

.profile-image {
    width: 300px;
    height: 300px;
    margin: 1.5rem auto -2rem auto;
    position: relative;
    z-index: 3; /* Ensure profile image is above the stamp */
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    animation: profilePulsate 0.8s ease-in-out 2;
}

.profile-image img:hover {
    transform: scale(1.05);
    cursor: pointer;
}

@keyframes profilePulsate {
    0% { transform: scale(1); }
    50% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.swiper {
    width: 100%;
    max-width: 1000px;
    height: 400px;
    margin: 0 auto 1.5rem;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.swiper-pagination {
    display: none;
}

/* Typography */
h1 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.7rem; /* Increased from 1.5rem */
    margin-bottom: 1rem;
    font-weight: 500;
}

h2 {
    font-size: 1.7rem; /* Increased from 1.5rem */
    margin-bottom: 1rem;
    font-weight: 500;
}

h3 {
    font-size: 1.3rem; /* Added explicit size */
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: var(--spacing);
}

p {
    margin-bottom: 1rem;
}

/* Default link styles */
a {
    color: var(--link-color);
    text-decoration: underline;
    position: relative;
    transition: color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

a:hover {
    color: var(--link-hover-color);
    animation: linkPulse 1.2s ease-in-out infinite;
}

@keyframes linkPulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Hand-drawn circles only for About section links */
.about-section a {
    text-decoration: none;
    padding: 0.1rem 0.3rem;
    display: inline-block;
}

.about-section a::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-1deg);
    width: calc(100% + 0.6rem);
    height: calc(100% + 0.4rem);
    border: 1.5px solid var(--link-color);
    border-radius: 45% 55% 50% 50%;
    opacity: 0.7;
    pointer-events: none;
    background: none;
}

.about-section a:hover::after {
    border-color: var(--link-hover-color);
    opacity: 1;
}

/* Navigation */
nav {
    margin-bottom: 4rem;
}

nav a {
    margin-right: 1.5rem;
    font-size: 0.9rem;
}

/* Layout - merged with content container above */

section {
    margin-bottom: 3rem;
}

/* Lists */
ul {
    list-style-type: none;
    margin-bottom: 2rem;
}

ul li {
    margin-bottom: 0.5rem;
}

/* Work section */
.work-item {
    margin-bottom: 3rem;
}

.work-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.arrow-link {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Contact section */
#contact {
    text-align: center;
    padding: 2rem 0;
    margin-top: 8rem;
}

#contact a {
    color: var(--link-color);
    text-decoration: none;
}

.email-section {
    font-size: 1rem;  /* Increased from 0.9rem to 1rem */
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.socials {
    font-size: 1.1rem;
    margin-top: 0;
    padding: 1rem 0;
}


/* Article styles */
.article-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 0;
}

.article-content h1 {
    margin-bottom: 2rem;
}

.article-body p {
    margin-bottom: 1.5rem;
}

.article-body .date {
    color: var(--text-color);
    font-style: italic;
    opacity: 0.85;
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 6rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        padding: 1.5rem;
    }
    
    body::before {
        top: 280px; /* Position below name on medium screens */
        left: 50%;
        transform: translateX(-50%); /* Center horizontally only */
        width: 140px;
        height: 87px; /* Maintain aspect ratio */
        background-size: 100% auto;
    }
    
    .profile-container {
        /* No top margin needed now that the stamp is below */
    }
    
    nav {
        margin-bottom: 3rem;
    }
    
    section {
        margin-bottom: 4rem;
    }
    
    main {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }
    
    body::before {
        top: 240px; /* Position below name on small screens */
        left: 50%;
        transform: translateX(-50%); /* Center horizontally only */
        width: 120px;
        height: 75px; /* Maintain aspect ratio */
        background-size: 100% auto;
    }
    
    .profile-container {
        /* No top margin needed now that the stamp is below */
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }
    
    main {
        padding: 1.25rem;
    }
}

/* New article styles */
.article-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem;
}

.article-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.article-text p {
    margin-bottom: 1rem;
}

.article-disclaimer {
    font-style: italic;
    margin-bottom: 1rem;
}

.article-tldr {
    font-weight: bold;
    margin-top: 1rem;
}

/* About section */
#about {
    margin-top: -12rem;
    padding: 2rem 2rem 0rem 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#about h2 {
    font-size: 1.7rem; /* Increased from 1.5rem */
    margin-bottom: 1rem;
    font-weight: normal;
    color: var(--text-color);
    text-align: left;
}

.about-content {
    text-align: left;
}

.about-content p {
    font-size: 1.15rem; /* Increased from 1rem */
    line-height: 1.6;
    margin-bottom: 1rem;
    color: var(--text-color);
}

/* Jots section - reduced top margin since About is now above */
#jots {
    margin-top: -2.5rem;
    padding: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#jots h2 {
    font-size: 1.7rem; /* Increased from 1.5rem */
    margin-bottom: 1rem;
    font-weight: normal;
    color: var(--text-color);
    text-align: left;
}

.jots-content p {
    margin-bottom: 0.5rem;
}

#jots h2:nth-child(3) {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.jots-content {
    margin-bottom: 3rem;
}

/* Specific link styles */
.back-link {
    display: inline-block;
    margin-top: 2rem;
    text-decoration: underline;
}

.jots-content a {
    text-decoration: underline;
}

.email-section a {
    text-decoration: underline;
}

/* Special inline links with underline */
.inline-link {
    color: #000; /* Black text */
    text-decoration: underline; /* Underlined */
    transition: none; /* No transition effect */
}

/* Loading screen styles */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-content {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.loading-profile {
    margin-bottom: 1rem;
    width: 120px;
    height: 120px;
    margin-left: auto;
    margin-right: auto;
    animation: profileSpin 2s ease-in-out infinite;
}

.loading-profile img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 50%;
}

.welcome-text {
    font-size: 1.5rem;
    font-weight: normal;
    color: var(--text-color);
    animation: fadeIn 1s ease-out 0.5s both;
}

@keyframes profileSpin {
    0% {
        transform: rotate(0deg) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        opacity: 1;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animated name with pencil circling */
.animated-name {
    display: inline-block;
    position: relative;
}

.animated-name span {
    display: inline-block;
}

.animated-name span.space {
    pointer-events: none;
}

/* Hand-drawn arrow - hidden but maintains spacing */
.hand-drawn-arrow {
    text-align: center;
    margin-top: 0.5rem;
    margin-bottom: -1rem;
    opacity: 0;
    visibility: hidden;
}

.hand-drawn-arrow svg {
    display: inline-block;
}

