/* Base styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #2d3748;
    color: #2d3748;
    line-height: 1.6;
}

/* Navigation */
nav {
    background-color: #1a202c;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    margin: 0;
    padding: 0;
}

nav li {
    margin: 0 1.5rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

nav a:hover {
    color: #63b3ed;
}

::selection {
    background-color: #2d3748;
    color: #fff;
}

/* Layout */
.container {
    width: 90%;
    max-width: 1000px;
    margin: 1rem auto 3rem auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Profile section */
.profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
    padding: 3rem;
    flex-direction: row-reverse;
    border-bottom: 1px solid #e2e8f0;
}

#profileImg {
    width: 220px;
    height: 320px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.profile-content {
    flex: 1;
    text-align: left;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1rem 0;
    letter-spacing: -0.025em;
}

h2 {
    font-size: 1.75rem;
    color: #2d3748;
    margin: 2rem 0 1.5rem 0;
    font-weight: 600;
    letter-spacing: -0.025em;
}

h3 {
    font-size: 1.25rem;
    color: #4a5568;
    margin: 1.5rem 0 0.5rem 0;
    font-weight: 600;
}

h4 {
    font-size: 1rem;
    color: #718096;
    margin: 0.5rem 0;
    font-weight: 500;
}

p {
    font-size: 1.125rem;
    color: #4a5568;
    margin: 0 0 1rem 0;
}

/* Content sections */
.content {
    padding: 2rem 3rem;
}

/* Lists */
ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

ul li {
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-size: 1.125rem;
}

ul li::before {
    content: "→";
    color: #4a5568;
    margin-right: 0.5rem;
}

/* Links */
a {
    color: #2d3748;
    text-decoration: none;
    border-bottom: 1px solid #e2e8f0;
    transition: border-color 0.2s ease;
}

a:hover {
    border-color: #2d3748;
}



/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #e2e8f0;
    color: #718096;
    margin-top: 2rem;
}

.social-links a {
    margin: 0 1rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.social-links a:hover {
    color: #63b3ed;
    border-bottom: 1px solid #63b3ed;
}

/* Certificate links */
section article a {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    color: #4a5568;
    font-size: 0.875rem;
}

section article a:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

/* Writeup Styles */
.nav {
    background-color: #1a202c;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: #63b3ed;
}

.writeup-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.writeup-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.writeup-header h1 {
    color: #1a202c;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.writeup-meta {
    color: #718096;
    font-size: 1rem;
    font-weight: 500;
}

.writeup-section {
    margin-bottom: 2rem;
}

.writeup-section h2 {
    color: #2d3748;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.writeup-section h3 {
    color: #4a5568;
    font-size: 1.25rem;
    margin: 1.5rem 0 0.5rem 0;
    font-weight: 600;
}

.writeup-section p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.writeup-section ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.writeup-section li {
    margin-bottom: 0.5rem;
    color: #4a5568;
}

.writeup-section li::before {
    content: "→";
    color: #4a5568;
    margin-right: 0.5rem;
}

.writeup-section pre {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1rem;
    overflow-x: auto;
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    line-height: 1.4;
    margin: 1rem 0;
}

.writeup-section span {
    font-weight: 600;
    color: #2d3748;
    display: block;
    margin: 1rem 0 0.5rem 0;
}

.note {
    background-color: #fef5e7;
    border-left: 4px solid #f6ad55;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 4px;
}

.note p {
    margin: 0;
    color: #744210;
}

.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #e2e8f0;
    color: #718096;
    margin-top: 2rem;
    background-color: #fff;
    border-radius: 0 0 8px 8px;
}

.footer a {
    margin: 0 1rem;
    color: #4a5568;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s ease;
}

.footer a:hover {
    color: #2d3748;
    border-bottom: 1px solid #2d3748;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Media queries */
@media (max-width: 768px) {
    .profile {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
        gap: 2rem;
    }

    .profile-content {
        text-align: center;
    }

    .content {
        padding: 1.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .writeup-container {
        margin: 1rem;
        padding: 1rem;
    }

    .writeup-header h1 {
        font-size: 2rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav li {
        margin: 0.5rem 0;
    }

    .social-links a {
        margin: 0 0.75rem;
    }
}

@media (max-width: 480px) {
    .profile {
        padding: 1rem;
        gap: 1rem;
    }

    #profileImg {
        width: 150px;
        height: 220px;
    }

    .content {
        padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.125rem;
    }

    p {
        font-size: 1rem;
    }

    nav li {
        margin: 0.25rem 0;
    }

    .social-links a {
        margin: 0 0.5rem;
        font-size: 0.875rem;
    }

    .writeup-container {
        margin: 0.5rem;
        padding: 0.5rem;
    }

    .writeup-header h1 {
        font-size: 1.75rem;
    }

    .writeup-section h2 {
        font-size: 1.125rem;
    }
}
