* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0a0a0a;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated gradient background */
body::before {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 138, 101, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 179, 237, 0.2) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #7877c6;
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}

/* Visually hidden */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ===================================
   NAVIGATION
   =================================== */
nav.main-nav {
    position: relative;
    z-index: 10;
    width: 100%;
    /* max-width: 900px;
    margin-left: auto;
    margin-right: auto; */
    margin-bottom: 30px;
    background: rgba(20, 20, 30, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px 30px;
}

nav.main-nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

nav.main-nav ul li {
    color: #c7c7d1;
    padding: 12px 16px;
    background: rgba(20, 20, 30, 0.5);
    border-left: 3px solid #7877c6;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    line-height: 1.6;
}

nav.main-nav ul li::before {
    content: '→';
    color: #7877c6;
    font-weight: bold;
    margin-right: 10px;
}

nav.main-nav a {
    color: #e4e4e7;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 1px solid transparent;
    background: rgba(120, 119, 198, 0.15);
}

nav.main-nav a:hover,
nav.main-nav a:focus {
    background: rgba(120, 119, 198, 0.2);
    border-color: rgba(120, 119, 198, 0.4);
    transform: translateY(-2px);
}

nav.main-nav a.active {
    background: linear-gradient(135deg, rgba(120, 119, 198, 0.3), rgba(255, 138, 101, 0.3));
    border-color: rgba(120, 119, 198, 0.6);
}

/* ===================================
   PROFILE CARD (HOME PAGE)
   =================================== */
article {
    background: rgba(20, 20, 30, 0.2);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 80px rgba(120, 119, 198, 0.1);
    animation: cardEntry 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Accent bar */
article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #7877c6, #ff8a65, #63b3ed);
    background-size: 200% 100%;
    animation: accentFlow 3s ease infinite;
}

.card-content {
    display: flex;
    flex-direction: column;
    padding: 40px;
    gap: 30px;
}

/* Avatar section */
.avatar-section {
    display: flex;
    align-items: center;
    gap: 24px;
}

figure {
    position: relative;
    flex-shrink: 0;
}

figure::before {
    content: '';
    position: absolute;
    inset: -4px;
    background: linear-gradient(135deg, #7877c6, #ff8a65);
    border-radius: 50%;
    z-index: -1;
    animation: avatarPulse 3s ease-in-out infinite;
}

figure img {
    width: auto;
    height: auto;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(20, 20, 30, 0.8);
    display: block;
}

.header-content {
    flex: 1;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a3a3ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.bio {
    color: #c7c7d1;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Timestamp with tooltip */
.timestamp-wrapper {
    position: relative;
    display: inline-block;
}

.timestamp {
    background: linear-gradient(135deg, rgba(120, 119, 198, 0.2), rgba(255, 138, 101, 0.2));
    border: 1px solid rgba(120, 119, 198, 0.3);
    padding: 16px 20px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #e4e4e7;
    cursor: help;
    transition: all 0.3s ease;
    display: block;
    align-items: center;
    gap: 10px;
}

.timestamp:hover {
    border-color: rgba(120, 119, 198, 0.6);
    background: linear-gradient(135deg, rgba(120, 119, 198, 0.3), rgba(255, 138, 101, 0.3));
    transform: translateY(-2px);
}

.timestamp strong {
    color: #a3a3ff;
    font-weight: 600;
}

/* Tooltip */
.tooltip {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(120, 119, 198, 0.4);
    padding: 12px 16px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(30, 30, 40, 0.95);
}

.timestamp-wrapper:hover .tooltip,
.timestamp:focus+.tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

.tooltip-label {
    font-size: 0.75rem;
    color: #a3a3ff;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
    font-weight: 600;
}

.tooltip-value {
    font-size: 0.9rem;
    color: #e4e4e7;
    font-family: 'Courier New', monospace;
}

/* Social links in profile card */
nav:not(.main-nav) {
    margin-top: 10px;
}

nav:not(.main-nav) h2 {
    font-size: 1.2rem;
    color: #e4e4e7;
    margin-bottom: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

nav:not(.main-nav) ul {
    list-style: none;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

nav:not(.main-nav) ul li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(120, 119, 198, 0.15);
    border: 1px solid rgba(120, 119, 198, 0.3);
    color: #e4e4e7;
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

nav:not(.main-nav) ul li a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(120, 119, 198, 0.2), rgba(255, 138, 101, 0.2));
    opacity: 0;
    transition: opacity 0.3s ease;
}

nav:not(.main-nav) ul li a:hover::before {
    opacity: 1;
}

nav:not(.main-nav) ul li a:hover {
    border-color: rgba(120, 119, 198, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(120, 119, 198, 0.3);
}

nav:not(.main-nav) ul li a:focus {
    outline: 2px solid #7877c6;
    outline-offset: 3px;
}

nav:not(.main-nav) ul li a span {
    position: relative;
    z-index: 1;
}

/* Sections */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

section {
    background: rgba(30, 30, 40, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.3s ease;
}

section:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(30, 30, 40, 0.6);
    transform: translateY(-2px);
}

section h2 {
    font-size: 1.1rem;
    color: #e4e4e7;
    margin-bottom: 16px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
}

.emoji-icon {
    font-size: 1.3rem;
}

section ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

section ul li {
    padding: 12px 16px;
    background: rgba(20, 20, 30, 0.5);
    border-left: 3px solid #7877c6;
    border-radius: 8px;
    color: #c7c7d1;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

section ul li:hover {
    background: rgba(30, 30, 40, 0.7);
    border-left-color: #a3a3ff;
    transform: translateX(4px);
}

.dislikes-section ul li {
    border-left-color: #ff8a65;
}

.dislikes-section ul li:hover {
    border-left-color: #ffb199;
}

/* ===================================
   CONTACT PAGE
   =================================== */

main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.container {
    background: rgba(20, 20, 30, 0.7);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    max-width: 900px;
    width: 100%;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    animation: cardEntry 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #7877c6, #ff8a65, #63b3ed);
    background-size: 200% 100%;
    animation: accentFlow 3s ease infinite;
}

.container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fff 0%, #a3a3ff 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #c7c7d1;
    margin-bottom: 30px;
    font-size: 1rem;
}

.form-group {
    margin-bottom: 24px;
}

label {
    display: block;
    color: #e4e4e7;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

label .required {
    color: #ff8a65;
    margin-left: 4px;
}

input,
textarea {
    width: 100%;
    padding: 12px 16px;
    background: rgba(30, 30, 40, 0.6);
    border: 1px solid rgba(120, 119, 198, 0.3);
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #7877c6;
    background: rgba(30, 30, 40, 0.8);
    box-shadow: 0 0 0 3px rgba(120, 119, 198, 0.1);
}

input.error,
textarea.error {
    border-color: #ff8a65;
}

textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    display: none;
    color: #ff8a65;
    font-size: 0.85rem;
    margin-top: 6px;
}

.error-message.visible {
    display: flex;
    align-items: center;
    gap: 6px;
}

.error-message::before {
    content: "⚠";
    font-size: 1rem;
}

.success-message {
    display: none;
    background: linear-gradient(135deg, rgba(99, 179, 237, 0.2), rgba(120, 119, 198, 0.2));
    border: 1px solid rgba(99, 179, 237, 0.4);
    border-radius: 12px;
    padding: 16px 20px;
    color: #63b3ed;
    margin-bottom: 24px;
    animation: slideIn 0.4s ease;
}

.success-message.visible {
    display: block;
}

.success-message::before {
    content: "✓ ";
    font-size: 1.2rem;
    margin-right: 8px;
}

button[type="submit"] {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #7877c6, #ff8a65);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(120, 119, 198, 0.4);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"]:focus {
    outline: 3px solid rgba(120, 119, 198, 0.5);
    outline-offset: 2px;
}

button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ===================================
   ABOUT PAGE
   =================================== */

/* About page uses wider container */
.about-container {
    max-width: 900px;
}

/* About page specific sections */
.about-container h2 {
    font-size: 1.4rem;
}

.about-container h2::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, #7877c6, #ff8a65);
    border-radius: 2px;
}

.about-container p {
    color: #c7c7d1;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 12px;
}

.about-container p:last-child {
    margin-bottom: 0;
}

.about-container section {
    margin-bottom: 32px;
}

.about-container section:last-child {
    margin-bottom: 0;
}

.about-container ul {
    margin-top: 12px;
}

.about-container ul li {
    line-height: 1.6;
}

.about-container ul li:last-child {
    margin-bottom: 0;
}

.about-container ul li::before {
    content: '→';
    color: #7877c6;
    font-weight: bold;
    margin-right: 10px;
}

.highlight-box {
    background: linear-gradient(135deg, rgba(120, 119, 198, 0.15), rgba(255, 138, 101, 0.15));
    border: 1px solid rgba(120, 119, 198, 0.3);
    border-radius: 12px;
    padding: 20px;
    margin-top: 12px;
}

.highlight-box p {
    color: #e4e4e7;
    font-style: italic;
    font-size: 1.05rem;
}

/* ===================================
   CUSTOM SCROLLBAR
   =================================== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #0a0a0a;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7877c6, #ff8a65);
    border-radius: 6px;
    border: 2px solid #0a0a0a;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #a3a3ff, #ffb199);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #7877c6 #0a0a0a;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (width >=768px) {

    .card-content {
        padding: 50px;
    }

    header h1 {
        font-size: 3rem;
    }

    figure img {
        width: 140px;
        height: 140px;
    }

    .container {
        padding: 50px;
    }

    .container h1 {
        font-size: 3rem;
    }

    .about-container h1 {
        font-size: 3rem;
    }

    .about-container h2 {
        font-size: 1.5rem;
    }
}

@media (width <=767px) {
    body {
        overflow-y: scroll;
    }

    .avatar-section {
        flex-direction: column;
        text-align: center;
    }

    header h1 {
        font-size: 2rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    figure {
        width: 60%;
        aspect-ratio: 1;

        & img {
            width: 100%;
            aspect-ratio: inherit;
        }
    }

    nav.main-nav {
        padding: 15px 20px;
    }

    nav.main-nav ul {
        gap: 10px;
    }

    nav.main-nav a {
        padding: 8px 16px;
        font-size: 0.9rem;
    }

    .container {
        padding: 30px 20px;
    }

    .container h1 {
        font-size: 2rem;
    }

    section {
        padding: 20px;
    }
}

/* ===================================
   ACCESSIBILITY & USER PREFERENCES
   =================================== */
@media (prefers-contrast: high) {
    body {
        background: #000;
    }

    article {
        border: 2px solid #fff;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */
@keyframes gradientShift {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(10%, 10%) rotate(180deg);
    }
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

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

@keyframes accentFlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

@keyframes avatarPulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes cardEntry {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

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